Atari 3D graphics

A log of experiments exploring 3D graphics on the Atari, from curve stitching to cubes and floating-point math.

My #DecemberAdventure Log

A personal record of early experiments and discoveries during the challenge.

1-Dec

Started with something simple today: creating curve stitching in Atari Basic.

2-Dec

My first attempt at a cube using fixed-point arithmetic in CC65, without a floating-point package.

Early Atari 3D cube experiment

I’m taking on the task of implementing a basic IEEE 754 float library in cc65.

3-Dec

Nothing. (Depeche Mode concert)

4-Dec

Keeping up with the cube and float-point work, getting better. Some weird vertex drawing is appearing.

Atari 3D experiment with vertex drawing

5-Dec

This is probably the slowest rotating cube in history. I wrote a BASIC implementation to debug the rotation; some shearing is happening.

Rotating cube experiment Another rotating cube experiment

6-7 Dec

I realized I didn’t know how to multiply matrices, so I fixed the formula in the original C code.

Rotating cube experiment Another rotating cube experiment

8 Dec

Implemented a nice little routine to clear the screen. now use the wam routines to speed up the drawing

Rotating cube experiment Another rotating cube experiment

9-10 Dec

Implemented fast pixel routines. for some reason multiplying by 40 is not working

Fast pixel routines Resulting image

11 Dec

Implemented putpixel and line in c, as base to troubleshoot. not too much difference in performance.

Line C routine

12-13 Dec

So much going on that I could not update. Adapting the putpixel routine to 2 bytes included a lot of debugging. I have a set pixel directly to video memory.

Fast pixel routines

Dealing with the arithmetic was tricky. ended up rewriting the y*40 routine.

14-15 Dec

Implemented a fast line routine. I have a set pixel directly to video memory.

step was to write the line in assembler. found a couple of routines already made here: https://forums.atariage.com/topic/231690-known-fast-line-algorithms/

tried to port and integrate dr Sid implementation (in thread). moving from mad assembler to cc65 was not too bad.

Y*40 result

but not sure about the macros. So mostly works, however , resolution and x coordinates are off. Rightmost triamgle should be in the middle

And it worked !

Y*40 result

Next step : double buffer.

Compare with the BASIC implementation speed

16-17 Dec

Trying to make page flipping work with mode 8 it seems display list requires more work to cross a 4k border. So I have buffer and a half.

Gap issue fixed and double buffer working, still had to move around some memory align manually.